<?php

namespace app\api\model\jd;
use app\api\model\Account;
use app\api\model\BaseModel;
use LinCmsTp5\admin\model\LinUser;

class User extends BaseModel
{
    protected $table = 'cps_event';
    protected $deleteTime = 'delete_time';
    protected $autoWriteTimestamp = 'datetime';

    public function account(){
        return $this->hasOne(Account::class,'app_id','app_id')->field('app_id,name');
    }

    public function name(){
        return $this->hasOne(LinUser::class,'id','uid')->field('id,username');
    }
}
